/*
 * Amazon Ads API - Sponsored Products
 * Use the Amazon Ads API for Sponsored Products for campaign, ad group, keyword, negative keyword, and product ad management operations. For more information about Sponsored Products, see the [Sponsored Products Support Center](https://advertising.amazon.com/help?entityId=ENTITY3CWETCZD9HEG2#GWGFKPEWVWG2CLUJ). For onboarding information, see the [account setup](setting-up/account-setup) topic.<br/><br/> 
 *
 * The version of the OpenAPI document: 2.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package org.openapitools.client.model;

import java.util.Objects;
import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
import java.math.BigDecimal;
import org.openapitools.client.model.MatchType;
import org.openapitools.client.model.State;
import org.openapitools.jackson.nullable.JsonNullable;

/**
 * CreateKeyword
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2022-04-12T19:05:39.971406+08:00[Asia/Shanghai]")
public class CreateKeyword {
  public static final String SERIALIZED_NAME_CAMPAIGN_ID = "campaignId";
  @SerializedName(SERIALIZED_NAME_CAMPAIGN_ID)
  private BigDecimal campaignId;

  public static final String SERIALIZED_NAME_AD_GROUP_ID = "adGroupId";
  @SerializedName(SERIALIZED_NAME_AD_GROUP_ID)
  private BigDecimal adGroupId;

  public static final String SERIALIZED_NAME_STATE = "state";
  @SerializedName(SERIALIZED_NAME_STATE)
  private State state;

  public static final String SERIALIZED_NAME_KEYWORD_TEXT = "keywordText";
  @SerializedName(SERIALIZED_NAME_KEYWORD_TEXT)
  private String keywordText;

  public static final String SERIALIZED_NAME_NATIVE_LANGUAGE_KEYWORD = "nativeLanguageKeyword";
  @SerializedName(SERIALIZED_NAME_NATIVE_LANGUAGE_KEYWORD)
  private String nativeLanguageKeyword;

  public static final String SERIALIZED_NAME_NATIVE_LANGUAGE_LOCALE = "nativeLanguageLocale";
  @SerializedName(SERIALIZED_NAME_NATIVE_LANGUAGE_LOCALE)
  private String nativeLanguageLocale;

  public static final String SERIALIZED_NAME_MATCH_TYPE = "matchType";
  @SerializedName(SERIALIZED_NAME_MATCH_TYPE)
  private MatchType matchType;

  public static final String SERIALIZED_NAME_BID = "bid";
  @SerializedName(SERIALIZED_NAME_BID)
  private Float bid;


  public CreateKeyword campaignId(BigDecimal campaignId) {
    
    this.campaignId = campaignId;
    return this;
  }

   /**
   * The identifer of the campaign to which the keyword is associated.
   * @return campaignId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifer of the campaign to which the keyword is associated.")

  public BigDecimal getCampaignId() {
    return campaignId;
  }


  public void setCampaignId(BigDecimal campaignId) {
    this.campaignId = campaignId;
  }


  public CreateKeyword adGroupId(BigDecimal adGroupId) {
    
    this.adGroupId = adGroupId;
    return this;
  }

   /**
   * The identifier of the ad group to which this keyword is associated.
   * @return adGroupId
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The identifier of the ad group to which this keyword is associated.")

  public BigDecimal getAdGroupId() {
    return adGroupId;
  }


  public void setAdGroupId(BigDecimal adGroupId) {
    this.adGroupId = adGroupId;
  }


  public CreateKeyword state(State state) {
    
    this.state = state;
    return this;
  }

   /**
   * Get state
   * @return state
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public State getState() {
    return state;
  }


  public void setState(State state) {
    this.state = state;
  }


  public CreateKeyword keywordText(String keywordText) {
    
    this.keywordText = keywordText;
    return this;
  }

   /**
   * The keyword text.
   * @return keywordText
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The keyword text.")

  public String getKeywordText() {
    return keywordText;
  }


  public void setKeywordText(String keywordText) {
    this.keywordText = keywordText;
  }


  public CreateKeyword nativeLanguageKeyword(String nativeLanguageKeyword) {
    
    this.nativeLanguageKeyword = nativeLanguageKeyword;
    return this;
  }

   /**
   * The unlocalized keyword text in the preferred locale of the advertiser.
   * @return nativeLanguageKeyword
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The unlocalized keyword text in the preferred locale of the advertiser.")

  public String getNativeLanguageKeyword() {
    return nativeLanguageKeyword;
  }


  public void setNativeLanguageKeyword(String nativeLanguageKeyword) {
    this.nativeLanguageKeyword = nativeLanguageKeyword;
  }


  public CreateKeyword nativeLanguageLocale(String nativeLanguageLocale) {
    
    this.nativeLanguageLocale = nativeLanguageLocale;
    return this;
  }

   /**
   * The locale preference of the advertiser. For example, if the advertiser’s preferred language is Simplified Chinese, set the locale to &#x60;zh_CN&#x60;. Supported locales include: Simplified Chinese (locale: zh_CN) for US, UK and CA. English (locale: en_GB) for DE, FR, IT and ES.
   * @return nativeLanguageLocale
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "The locale preference of the advertiser. For example, if the advertiser’s preferred language is Simplified Chinese, set the locale to `zh_CN`. Supported locales include: Simplified Chinese (locale: zh_CN) for US, UK and CA. English (locale: en_GB) for DE, FR, IT and ES.")

  public String getNativeLanguageLocale() {
    return nativeLanguageLocale;
  }


  public void setNativeLanguageLocale(String nativeLanguageLocale) {
    this.nativeLanguageLocale = nativeLanguageLocale;
  }


  public CreateKeyword matchType(MatchType matchType) {
    
    this.matchType = matchType;
    return this;
  }

   /**
   * Get matchType
   * @return matchType
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "")

  public MatchType getMatchType() {
    return matchType;
  }


  public void setMatchType(MatchType matchType) {
    this.matchType = matchType;
  }


  public CreateKeyword bid(Float bid) {
    
    this.bid = bid;
    return this;
  }

   /**
   * Bid associated with this keyword. Applicable to biddable match types only.
   * minimum: 0.02
   * @return bid
  **/
  @javax.annotation.Nullable
  @ApiModelProperty(value = "Bid associated with this keyword. Applicable to biddable match types only.")

  public Float getBid() {
    return bid;
  }


  public void setBid(Float bid) {
    this.bid = bid;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    CreateKeyword createKeyword = (CreateKeyword) o;
    return Objects.equals(this.campaignId, createKeyword.campaignId) &&
        Objects.equals(this.adGroupId, createKeyword.adGroupId) &&
        Objects.equals(this.state, createKeyword.state) &&
        Objects.equals(this.keywordText, createKeyword.keywordText) &&
        Objects.equals(this.nativeLanguageKeyword, createKeyword.nativeLanguageKeyword) &&
        Objects.equals(this.nativeLanguageLocale, createKeyword.nativeLanguageLocale) &&
        Objects.equals(this.matchType, createKeyword.matchType) &&
        Objects.equals(this.bid, createKeyword.bid);
  }

  private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
    return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
  }

  @Override
  public int hashCode() {
    return Objects.hash(campaignId, adGroupId, state, keywordText, nativeLanguageKeyword, nativeLanguageLocale, matchType, bid);
  }

  private static <T> int hashCodeNullable(JsonNullable<T> a) {
    if (a == null) {
      return 1;
    }
    return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class CreateKeyword {\n");
    sb.append("    campaignId: ").append(toIndentedString(campaignId)).append("\n");
    sb.append("    adGroupId: ").append(toIndentedString(adGroupId)).append("\n");
    sb.append("    state: ").append(toIndentedString(state)).append("\n");
    sb.append("    keywordText: ").append(toIndentedString(keywordText)).append("\n");
    sb.append("    nativeLanguageKeyword: ").append(toIndentedString(nativeLanguageKeyword)).append("\n");
    sb.append("    nativeLanguageLocale: ").append(toIndentedString(nativeLanguageLocale)).append("\n");
    sb.append("    matchType: ").append(toIndentedString(matchType)).append("\n");
    sb.append("    bid: ").append(toIndentedString(bid)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

